<?php
error_reporting(0);
include '../comm/config.php';
include_once '../comm/checkpostandget.php';
$windconfig = get_phpwind_config();

$email = trim($_GET["email"]);
if ($email == '') {
    echo -4; //email不合法
    exit;
} 

if (UC == 1) {
    include '../data/config.inc.php';
    include '../uc_client/client.php';
    echo $ucresult = uc_user_checkemail($email);
	exit;
    //echo $ucresult; // 1可用  -4格式有误  -5不允许注册  -6已存在
}
elseif ($windconfig['open'] == 'on') {
    $query = "select * from " . $BIAOTOU . "user where email='" . $email . "' limit 1";
    $res = mysql_query($query);
    if (mysql_num_rows($res) != 0) {
        echo -6; //email已存在
        exit;
    }
    echo 1;
} else {
    $query = "select * from " . $BIAOTOU . "user where email='" . $email . "' limit 1";
    $res = mysql_query($query);
    if (mysql_num_rows($res) != 0) {
        echo -6; //email已存在
    } else {
        echo 1; //email可用
    }
}
mysql_close();
?>